<?php

use Illuminate\Routing\Router;

Admin::registerAuthRoutes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
], function (Router $router) {
    $router->get('/', 'HomeController@index');
    $router->resource('/adverts', AdvertsController::class);
    $router->resource('/user/permission', UserPermissionController::class);
    $router->resource('/user/userauth', UserAuthController::class);
    $router->resource('/user/integral_log', IntegralLogController::class);
    $router->resource('/group', GroupController::class);
    $router->resource('/user', UserController::class);
    //$router->resource('/kill/status', GoodKillController::class);
    $router->resource('/kill/user', KillUserController::class);
    $router->resource('/kill/manage', KillManageController::class);
    $router->resource('/goods/unaudited', GoodsController::class);
    $router->resource('/bursting/examine', BurstingController::class);
    $router->resource('/goodscorrection', GoodsCorrectionController::class);
    $router->resource('finance', FinanceController::class);
    $router->resource('userintegral', UserIntegralController::class);
    $router->resource('userfinance', UserFinanceController::class);
    $router->resource('customer_service', CustomerController::class);
    $router->resource('describe_rule', DescribeRuleController::class);
    $router->resource('log', LogController::class);
    $router->resource('statistics', StatisticsController::class);
    $router->get('/kill/LowerFrame', 'KillManageController@LowerFrame');
    $router->any('/goods/update_status', 'GoodsController@update_status');
    $router->any('/bursting/save', 'BurstingController@saveBursting');
    $router->any('/bursting/update_status', 'BurstingController@update_status');
    $router->any('/goods/{id}/edit_goods', 'GoodsController@edit_goods');
    $router->any('/bursting/{id}/edit_goods', 'BurstingController@edit_goods');
    $router->resource('/goodscopywriting', GoodsCopywritingController::class);
    $router->resource('/custom', ColumninfoController::class);
    Route::get('/checkGood', 'ApiController@checkGood')->name('checkGood');
    Route::get('/showCloseReason', 'ApiController@showCloseReason')->name('showCloseReason');
    Route::get('/showReason', 'ApiController@showReason')->name('showReason');
    Route::get('/getGoodsCoverimage', 'ApiController@getGoodsCoverimage')->name('getGoodsCoverimage');
    Route::get('/setGoodImage', 'ApiController@setGoodImage')->name('setGoodImage');

    Route::get('/error_correction', 'ApiController@error_correction')->name('error_correction');
    Route::get('/del_error_goods', 'ApiController@del_error_goods')->name('del_error_goods');

    $router->resource('/test', TestController::class);
});

//Route::get('/admin/kill/LowerFrame', 'KillManageController@LowerFrame');

// Route::get('images/{path}', function () {
//     return \App\Utils\ImageRoute::imageStorageRoute();
// });